#!/usr/bin/python
import tcsy.request_api as request
# encoding: utf-8


# 登录
def login(session, domain, username, password):
    url = domain + '/tp-api/account.php/Login/Login'
    login_data = {
        "name": username,
        "password": password,
    }

    return request.request_api(session, url, **login_data)


# 登出
def login_out(session, domain):
    url = domain + '/tp-api/account.php/Login/loginOut'
    return request.request_api(session, url)

